<% [:error, :warning, :success, :info, :notice, :alert].each do |message_type| %>
  <% if flash[message_type] %>
    <div class="<%= "alert alert-#{message_type} fade in" %>">
      <%= link_to '&times;'.html_safe, '#', :class => 'close' %>
      <%= flash[message_type] %>
    </div>
  <% end %>
<% end %>
